package at.studentinformation;

import org.json.JSONArray;
import org.json.JSONObject;

public class ReturnData {
	public int RetCode;
	public String Content;
	public String Message;
	
	public static ReturnData ExamineFromJson(String input)
	{
		ReturnData result = new ReturnData();
		try
        {            
            JSONArray entries = new JSONArray(input);            
            JSONObject post = entries.getJSONObject(0);                
            result.RetCode = Integer.parseInt(post.getString("RetCode"));
            result.Content = post.getString("Content");
            result.Message = post.getString("Message");
        }
        catch (Exception ex)
        {
        	ex.printStackTrace(); 
        }
		return result;
	}
}
